package com.example.demo.poxy;

import org.springframework.beans.factory.annotation.Autowired;

public class MiddlerPoxy  implements Thing{


    public TargetMethod targetMethod;

    public MiddlerPoxy(TargetMethod targetMethod) {
        this.targetMethod = targetMethod;
    }

    @Override
    public void rent() {
        System.out.println("开始代理");
        targetMethod.rent();

        System.out.println("结束代理");

    }
}
